JavaResult

open class JavaResult<T>

kotlin.Result doesn't really work in Java. Use toJavaResult to convert it to JavaResult that provides similar features as kotlin.Result.

Functions

Link copied to clipboard
open fun <T> failure(e: Throwable): JavaResult<T>
Link copied to clipboard
open fun <T> success(d: T): JavaResult<T>

Properties

Link copied to clipboard
val data: T
Link copied to clipboard
Link copied to clipboard
val FAILURE: Int = 1
Link copied to clipboard
val SUCCESS: Int = 0
Link copied to clipboard
val type: Int